using System;
using System.Collections.Generic;
using MNH.Yarekoodak.DomainClasses;

namespace MNH.Yarekoodak.Services.Users
{
    /// <summary>
    /// User service interface
    /// </summary>
    public partial interface IUserService
    {
        /// <summary>
        /// Deletes a user 
        /// </summary>
        /// <param name="user">User </param>
        void DeleteUser(User user);

        /// <summary>
        /// Gets a user 
        /// </summary>
        /// <param name="userId">User  identifier</param>
        /// <returns>User </returns>
        User GetUserById(int userId, bool asNoTrack = false);

        /// <summary>
        /// Gets a user 
        /// </summary>
        /// <param name="userId">User  identifier</param>
        /// <returns>User </returns>
        User GetUserByNationalCode(string nationalCode, bool asNoTrack = false);

        IEnumerable<User> GetAllUseres();

        IEnumerable<User> GetAllUsersByRoleId(int roleId);

        /// <summary>
        /// Inserts a user 
        /// </summary>
        /// <param name="user">User </param>
        void InsertUser(User user);

        /// <summary>
        /// Updates the user 
        /// </summary>
        /// <param name="user">User </param>
        void UpdateUser(User user);

    }
}
